//
//  SelfInfoLabelTableViewCell.m
//  customer
//
//  Created by Holothurian on 2018/10/24.
//  Copyright © 2018年 yinlong. All rights reserved.
//

#import "SelfInfoLabelTableViewCell.h"

@implementation SelfInfoLabelTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        _nameLabel = [[UILabel alloc]init];
        _nameLabel.font = Font28;
        _nameLabel.textColor = [HSPublic colorWithHexString:@"666666"];
        [self.contentView addSubview:_nameLabel];
        AutoWeakSelf
        [_nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(weakSelf.contentView).offset(15);
            make.centerY.equalTo(weakSelf.contentView);
            make.size.mas_equalTo(CGSizeMake(70,30));
        }];
        
        _detailNameLabel = [[UILabel alloc]init];
        _detailNameLabel.font = Font28;
        _detailNameLabel.textColor = [HSPublic colorWithHexString:@"666666"];
        _detailNameLabel.textAlignment = NSTextAlignmentRight;
        [self.contentView addSubview:_detailNameLabel];
        [_detailNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(weakSelf.contentView).offset(-10);
            make.centerY.equalTo(weakSelf.contentView);
            make.size.mas_equalTo(CGSizeMake(F_DEVICE_W - 100, 30));
        }];
        
    }
    return self;
}


- (void)cellForLayout:(NSDictionary *)dict{
    NSString *name = [dict objectForKey:@"key"];
    NSString *detailName = [dict objectForKey:@"value"];
    self.nameLabel.text = name;
    self.detailNameLabel.text = detailName;
}

@end
